/*Copyright 2019-2021 T-Head Semiconductor Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// &ModuleBeg; @24
module ct_clint_top (
  // &Ports, @25
  input    wire          apb_clk_en,
  input    wire          ciu_clint_icg_en,
  input    wire          cpurst_b,
  input    wire          forever_apbclk,
  input    wire          forever_cpuclk,
  input    wire          pad_yy_icg_scan_en,
  input    wire  [31:0]  paddr,
  input    wire          penable,
  input    wire  [1 :0]  pprot,
  input    wire          psel_clint,
  input    wire  [31:0]  pwdata,
  input    wire          pwrite,
  input    wire  [63:0]  sysio_clint_mtime,
  output   wire          clint_core0_ms_int,
  output   wire          clint_core0_mt_int,
  output   wire          clint_core0_ss_int,
  output   wire          clint_core0_st_int,
  output   wire          clint_core1_ms_int,
  output   wire          clint_core1_mt_int,
  output   wire          clint_core1_ss_int,
  output   wire          clint_core1_st_int,
  output   wire          perr_clint,
  output   wire  [31:0]  prdata_clint,
  output   wire          pready_clint
); 



// &Regs; @26
// &Wires; @27


//==========================================================
// Instance clint func
//==========================================================
// &Instance("ct_clint_func"); @32
ct_clint_func  x_ct_clint_func (
  .apb_clk_en         (apb_clk_en        ),
  .ciu_clint_icg_en   (ciu_clint_icg_en  ),
  .clint_core0_ms_int (clint_core0_ms_int),
  .clint_core0_mt_int (clint_core0_mt_int),
  .clint_core0_ss_int (clint_core0_ss_int),
  .clint_core0_st_int (clint_core0_st_int),
  .clint_core1_ms_int (clint_core1_ms_int),
  .clint_core1_mt_int (clint_core1_mt_int),
  .clint_core1_ss_int (clint_core1_ss_int),
  .clint_core1_st_int (clint_core1_st_int),
  .cpurst_b           (cpurst_b          ),
  .forever_apbclk     (forever_apbclk    ),
  .forever_cpuclk     (forever_cpuclk    ),
  .pad_yy_icg_scan_en (pad_yy_icg_scan_en),
  .paddr              (paddr             ),
  .penable            (penable           ),
  .perr_clint         (perr_clint        ),
  .pprot              (pprot             ),
  .prdata_clint       (prdata_clint      ),
  .pready_clint       (pready_clint      ),
  .psel_clint         (psel_clint        ),
  .pwdata             (pwdata            ),
  .pwrite             (pwrite            ),
  .sysio_clint_mtime  (sysio_clint_mtime )
);



// &ModuleEnd; @35
endmodule



